From 4dc7c3dabaf8141a9096e42982ef45a389bca0ab Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Wed, 27 Jan 2010 08:59:47 +0000 Subject: [PATCH] xend: destroy restored domain when its device doesn't exist A migrated domain keeps on running even though its disk doesn't exist. This situation must be undesirable. Signed-off-by: Kouya Shimura --- tools/python/xen/xend/XendCheckpoint.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tools/python/xen/xend/XendCheckpoint.py b/tools/python/xen/xend/XendCheckpoint.py index 7a38588d0c..50d671a1e9 100644 --- a/tools/python/xen/xend/XendCheckpoint.py +++ b/tools/python/xen/xend/XendCheckpoint.py @@ -344,19 +344,18 @@ def restore(xd, fd, dominfo = None, paused = False, relocating = False): try: dominfo.waitForDevices() # Wait for backends to set up - except Exception, exn: - log.exception(exn) - - if lock: - XendDomain.instance().domains_lock.acquire() + finally: + if lock: + XendDomain.instance().domains_lock.acquire() if not paused: dominfo.unpause() return dominfo - except: + except Exception, exn: dominfo.destroy() - raise + log.exception(exn) + raise exn class RestoreInputHandler: -- 2.30.2